var app = getApp();
import { Config } from '../../utils/config.js';
import { Access } from '../../utils/access.js';
function  bindGetUserInfo   (e) {
      if (e.detail.errMsg == "getUserInfo:ok") {
          var access = new Access();
          access.getbreak();
      } else {
            wx.showModal({
            title: '提示',
            content: '用户信息用于页面数据展示，请重新授权',
            success: function (res) {
            if (res.confirm) {
                  wx.showToast({
                  title: '请重新授权',
                  icon: 'loading',
                  duration: 1000
                  })
            } else if (res.cancel) {
                  wx.showModal({
                        title: '友情提示',
                        content: '为了更好的用户体验，请重新授权',
                        success: function (res) {
                              if (res.confirm) { } else if (res.cancel) {}
                        }
                  })
            }
            }
            })
      }
}
module.exports = {
      bindGetUserInfo: bindGetUserInfo
};